//router.js
var url = require('url');
function route(handle,req,res){
	var pathname = url.parse(req.url).pathname;
	if(typeof handle[pathname] == 'function'){
		return handle[pathname](res,req);
	}else{
		return handle["404"](res);
	}
}
exports.route = route;